Integrand size = 23, antiderivative size = 107 \[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {4 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {8 a^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3873, 3856, 2719, 4130, 2720} \[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {8 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {4 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 3873
Rule 4130
Rubi steps \begin{align*} \text {integral}& = \left (2 a^2\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\int \frac {a^2+a^2 \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (4 a^2\right ) \int \sqrt {\sec (c+d x)} \, dx+\left (2 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = \frac {4 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {1}{3} \left (4 a^2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {4 a^2 \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {8 a^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {2 a^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 1.61 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.46 \[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {a^2 \left (\cos \left (\frac {c}{2}\right )-i \sin \left (\frac {c}{2}\right )\right ) \left (-i \cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (12-\frac {24 \operatorname {Hypergeometric2F1}\left (-\frac {1}{4},\frac {1}{2},\frac {3}{4},-e^{2 i (c+d x)}\right )}{\sqrt {1+e^{2 i (c+d x)}}}+8 \sqrt {1+e^{2 i (c+d x)}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},-e^{2 i (c+d x)}\right ) \sec (c+d x)+2 i \sin (c+d x)\right )}{3 d \sqrt {\sec (c+d x)}} \]
[In]
[Out]
Time = 15.16 (sec) , antiderivative size = 228, normalized size of antiderivative = 2.13
method | result | size |
default | \(-\frac {4 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, a^{2} \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\right )}{3 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(228\) |
parts | \(-\frac {2 a^{2} \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}-\frac {2 a^{2} \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}+\frac {4 a^{2} \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(453\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.25 \[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {2 \, {\left (a^{2} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 2 i \, \sqrt {2} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 2 i \, \sqrt {2} a^{2} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 i \, \sqrt {2} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 3 i \, \sqrt {2} a^{2} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )\right )}}{3 \, d} \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=a^{2} \left (\int \frac {1}{\sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {2}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int \sqrt {\sec {\left (c + d x \right )}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\sec \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (a \sec \left (d x + c\right ) + a\right )}^{2}}{\sec \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+a \sec (c+d x))^2}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
[In]
[Out]